package com.micro.frog.rbac.controller;

import com.micro.frog.common.base.Result;
import com.micro.frog.rbac.service.UserService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author :  ljh
 * @date : 2018/4/9
 **/
@RestController
@AllArgsConstructor
public class LoginController {

    private final UserService userService;

    @PostMapping(value = "/admin/login.do")
    public Result login(String userName, String password, HttpServletRequest request, HttpServletResponse response) {
        return userService.login(userName, password, request, response);
    }

}
